<h2>DESCRIPTION</h2>

<em>v.db.renamecolumn</em> renames a column in the attribute table connected
to a given vector map. It automatically checks the connection for the specified
layer.

<h2>NOTES</h2>

If the map table is connected through the DBF or SQLite drivers, the renaming
is internally done by adding a new column with new name, transferring the contents
of the old column to the new column and dropping the old column. This is needed
as DBF or SQLite do not support "ALTER TABLE" command to rename columns. Due to
this the renamed column is found as last column of the table, it's original position
cannot be maintained.

<p>The SQLite driver will exit with an error if the column rename involves only a change of 
case, i.e., upper-to-lowercase, or lower-to-uppercase. The SQLite protocol considers "NAME"
and "name" to be identical column names. In cases like these, the user should rename the original
column to an intermediary name, then rename the intermediary to the final name.

<h2>EXAMPLES</h2>

Renaming a column:<br>
<div class="code"><pre>
g.copy vect=roadsmajor,myroads
v.info -c myroads
v.db.renamecolumn myroads column=ROAD_NAME,roadname
v.info -c myroads
</pre></div>

<h2>SEE ALSO</h2>

<em>
<a href="db.execute.html">db.execute</a>,
<a href="v.db.addcolumn.html">v.db.addcolumn</a>,
<a href="v.db.addtable.html">v.db.addtable</a>,
<a href="v.db.connect.html">v.db.connect</a>,
<a href="v.db.dropcolumn.html">v.db.dropcolumn</a>,
<a href="v.db.droptable.html">v.db.droptable</a>,
<a href="v.db.select.html">v.db.select</a>,
<a href="v.db.update.html">v.db.update</a><br>
<a href="sql.html">GRASS SQL interface</a>
</em>

<h2>AUTHOR</h2>

Markus Neteler

<!--
<p>
<i>Last changed: $Date$</i>
-->
